<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <title>添加医生</title>
  <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <link rel="stylesheet" href="../../static/css/style.css" th:href="@{/css/style.css}"/>
</head>
<body>
<div th:replace="~{common/layout :: header}"></div>
<div th:replace="~{common/layout :: sidebar}"></div>
<div class="container mt-5">
  <h1 class="mb-4">添加医生</h1>
  <form action="#" th:action="@{/doctors/add}" th:object="${doctor}" method="post" class="form-horizontal">
    <div class="form-group">
      <label class="control-label col-sm-2">医生编号:</label>
      <div class="col-sm-10">
        <input type="text" th:field="*{docCode}" class="form-control" required/>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2">姓名:</label>
      <div class="col-sm-10">
        <input type="text" th:field="*{realName}" class="form-control" required/>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2">密码:</label>
      <div class="col-sm-10">
        <input type="password" th:field="*{password}" class="form-control" required/>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2">性别:</label>
      <div class="col-sm-10">
        <select th:field="*{sex}" class="form-control" required>
          <option value="1">男</option>
          <option value="0">女</option>
        </select>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-sm-2">部门号:</label>
      <div class="col-sm-10">
        <input type="text" th:field="*{deptno}" class="form-control" required/>
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <button type="submit" class="btn btn-primary">提交</button>
      </div>
    </div>
  </form>
  <a href="/doctors" class="btn btn-default">返回医生列表</a>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
